package com.lyz.dataStructure.algorithm.wangyi2020;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 16:26
 * @Description:
 **/


import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/8/3 16:26
 *@Description:
 **/
public class Main3 {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        int n = sc.nextInt();
        int[] scores = new int[n];
        int[] num = new int[n];
        for(int i =0;i<n;i++){
            scores[i] = sc.nextInt();
        }
        int q = sc.nextInt();
        for(int j =0;j<q;j++){
            num[j] = sc.nextInt();
        }
        double p =0;
        int score = 0;
        int count;
        for(int k =0;k<n;k++){
            count = 0;
            score = scores[num[k]-1];
            for(int i =0;i<scores.length;i++){
                if(score>=scores[i]){
                    count++;
                }
            }
            p = (double)(count-1)/n*100;
            System.out.printf("%.6f\n",p);
        }
    }
}
